package bot.pojo;

import lombok.Data;

@Data
public class JsonReturn<T> {
    private Integer code;

    private String msg;

    private T data;

    private JsonReturn(T data){
        this.code = 200;
        this.msg = "ok";
        this.data = data;
    }
    private JsonReturn(){
        this.code = 200;
        this.msg = "ok";
        this.data = null;
    }
    public static JsonReturn ok(Object data ){
        return new JsonReturn(data);
    }
}
